package com.everyday.practice.leetCode;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Meituan002 {
    public static void main(String[] args) {

    }

    public static Integer max() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(1, 1);
        map.put(2, 2);
        map.put(3, 3);
        map.put(6, 6);
        map.put(4, 4);
        map.put(5, 5);
        Scanner scanner = new Scanner(System.in);
        Integer next = scanner.nextInt();
        map.remove(next);
        int left = 0;
        int right = 0;
        Set<Integer> keys = map.keySet();
        for (Integer key : keys) {
            if (key < next) {
                left += map.get(key);
            } else {
                right += map.get(key);
            }
        }
        return Math.max(left, right);
    }
}
